package com.qf.blog.config;

import com.qiniu.storage.Region;
import com.qiniu.storage.UploadManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QiNiuConfig {
    @Bean
    public UploadManager uploadManager(){
//        创建一个配置对象，设置服务器的区域为华北
        com.qiniu.storage.Configuration cfg = new com.qiniu.storage.Configuration(Region.region1());
        UploadManager uploadManager = new UploadManager(cfg);
        return uploadManager;
    }
}
